package factory.entity;

import factory.base.BasePizza;
import factory.base.PizzaIngredientFactory;
import factory.base.Veggies;

/**
 * 纽约芝士披萨
 *
 * @author yaojianfeng
 */
public class NyStyleCheesePizza extends BasePizza {
    PizzaIngredientFactory ingredientFactory;

    public NyStyleCheesePizza(PizzaIngredientFactory ingredientFactory) {
        this.ingredientFactory = ingredientFactory;
        this.name = "纽约人肉芝士披萨";
    }


    @Override
    public void prepare() {
        this.setDough(ingredientFactory.createDough());
        System.out.println("揉搓" + this.getDough());
        this.setClam(ingredientFactory.createClams());
        System.out.println("添加海鲜" + this.getClam());
        this.setSauce(ingredientFactory.createSauce());
        System.out.println("添加酱料" + this.getSauce());
        this.setPepperoni(ingredientFactory.createPepperoni());
        System.out.println("添加香肠" + this.getPepperoni());

        System.out.println("添加佐料: ");
        for (int i = 0; i < topping.size(); i++) {
            System.out.println("  " + topping.get(i));
        }
        System.out.println("添加蔬菜: ");
        Veggies[] veggies = ingredientFactory.createVeggies();
        this.setVeggies(veggies);
        for (int i = 0; i < veggies.length; i++) {
            System.out.println("  " + veggies[i]);
        }

    }

}
